<script setup>
import { ref } from "vue";
import { useRegister } from "@/hooks/register-hook";
import C from "@/components/C"

const qq_account = ref("");
const nick_name = ref("");

const show = ref(false);

// start register
const registerHandler = () => useRegister(show,qq_account, nick_name);

</script>

<template>
  <div id="register">
    <C.Overlay  :show="show" text="注册中..."/>
    <br />
    <van-cell-group inset>
      <van-field v-model="qq_account" placeholder="请输入QQ号" />
    </van-cell-group>
    <van-cell-group inset>
      <van-field v-model="nick_name" placeholder="请输入昵称" />
    </van-cell-group>
    <div style="padding: 10px">
      <van-button size="large" @click="registerHandler" type="primary">
        注册用户
      </van-button>
    </div>
    &nbsp;&nbsp;
    <router-link to="/login"> 登录 </router-link>
  </div>
</template>

